package com.jeeinc.oa.domain;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "oa_account")
public class Account {
	/** 正常 */
	public static final Integer ACCOUNT_STATE_NORMAL = 0;
	/** 暂停 */
	public static final Integer ACCOUNT_STATE_PAUSE = 1;
	/** 冻结 */
	public static final Integer ACCOUNT_STATE_FROZEN = 2;
	/** 注销 */
	public static final Integer ACCOUNT_STATE_CANCEL = 99;

	private Integer id;
	private String name;
	private String loginname;
	private String loginpwd;
	private String mask;
	private Date lastlogin;
	private Integer loginfail = 0;
	private Integer maxfail = 5;
	private Integer state = 0; // 0-正常；1-暂停；2-冻结；99-注销

	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getLoginname() {
		return loginname;
	}

	public void setLoginname(String loginname) {
		this.loginname = loginname;
	}

	public String getLoginpwd() {
		return loginpwd;
	}

	public void setLoginpwd(String loginpwd) {
		this.loginpwd = loginpwd;
	}

	public String getMask() {
		return mask;
	}

	public void setMask(String mask) {
		this.mask = mask;
	}

	public Date getLastlogin() {
		return lastlogin;
	}

	public void setLastlogin(Date lastlogin) {
		this.lastlogin = lastlogin;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Integer getLoginfail() {
		return loginfail;
	}

	public void setLoginfail(Integer loginfail) {
		this.loginfail = loginfail;
	}

	public Integer getMaxfail() {
		return maxfail;
	}

	public void setMaxfail(Integer maxfail) {
		this.maxfail = maxfail;
	}

}
